<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path2 = request.getContextPath();
    String basePath2 = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path2 + "/";
%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="<%=path2%>/HoganJS/handlebars-v4.0.11.js"></script>
    <title>Insert title here</title>
    <style type="text/css">
        li span {
            margin-left: 0px;
            cursor: pointer;
        }

        li span:hover {
            color: #427dff
        }

        /**按钮样式**/
        .subtn1 {
            background: #57a0ff;
            border-radius: 50px;
            background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
            background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
            background: linear-gradient(top, #57a0ff, #57a1ff);
            background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
            border: 1px solid #2576A8;
            box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
            color: #fff;
            height: 40px;
            text-shadow: 1px 1px 0.5px #22629B;
            outline: none;
        }

        .btn {
            background: #57a0ff, background;
            border-radius: 50px;
            background: -webkit-linear-gradient(top, #57a0ff, #57a1ff);
            background: -moz-linear-gradient(top, #57a0ff, #57a1ff);
            background: linear-gradient(top, #57a0ff, #57a1ff);
            background: -ms-linear-gradient(top, #57a0ff, #57a1ff);
            border: 1px solid #2576A8;
            box-shadow: 0 1px 2px #8AC1E2 inset, 0 -1px 0 #57a0ff inset;
            color: #fff;
            height: 40px;
            text-shadow: 1px 1px 0.5px #22629B;
            outline: none;
        }

        .subtn1:hover {
            background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
        }

        .btn:hover {
            background: -webkit-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -moz-linear-gradient(top, #8DC9EF, #4E9FD1);
            background: linear-gradient(top, #8DC9EF, #4E9FD1);
            background: -ms-linear-gradient(top, #8DC9EF, #4E9FD1);
        }

        .modal-data {
            visibility: hidden;
            z-index: 1001;
            width: 1000px;
            min-height: 500px;
            margin: 100px auto;
            background-color: #FFFFFF;
            /* border: 1px solid #C80B14;*/
            -moz-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
            -webkit-box-shadow: 0 10px 20px #8AC1E2 inset, 0 -10px 0 #57a0ff inset;
            /*         box-shadow:0 0 10px #cccccc;
                    box-shadow: #cccccc; */
            box-shadow: 0 10px 20px #57a1ff inset, 0 -10px 0 #57a0ff inset;
            padding: 5px;
            text-align: center;
            position: fixed;
            left: 22%;
        }

        .modal-data1 td {
            padding-left: 15px;
            padding-right: 15px
        }

        .modal-data1 tr:FIRST-CHILD td {
            padding: 0px 10px;
        }

        .modal-data1 tr {
            padding-top: 30px
        }

        .modal-data1 form table {
            margin: 0px
        }

        input[type=checkbox] {
            padding: 0px;
            margin: 0px;
            text-align: right;
            width: 15px
        }

        .div_zilei {
            width: 600px;
            padding-left: 90px;
            height: 30px
        }

        .tr {
            height: 40px;
            background: #a9bbe0
        }

        .tr td {
            font-size: 14px;
            color: #ffffff
        }

        .tr_td {
            height: 40px;
        }

        .tr_td td {
            border-bottom: 1px solid #ededed;
            text-align: center;
        }

        tr td:nth-child(1) {
            font-size: 14px;
            color: #cccccc
        }

        .date {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .tr_td td:nth-child(1) {
            border-left: 1px solid #cccccc;
        }

        .addTable.deleteTable:HOVER {
            cursor: pointer;
        }

        .fseq {
            width: 37px;
            border: 0;
            text-align: center;
            color: #cccccc
        }

        .jczl {
            padding-left: 100px;
        }

        .div_tj {
            margin-top: 40px;
            padding-right: 60px;
        }

        .text {
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .remuneration1 {
            width: 150px;
            border: 0;
            background: #ffffff;
            text-align: center;
        }

        .loading {
            margin: 100px 450px;
            display: block;
            width: 65px;
            height: 65px;
            border: 1px solid #ddd;
            border-radius: 5px;
            opacity: .7;
            background: url(../images/loading.gif) no-repeat;
        }

        .botton {
            float: left;
            margin-left: 80px;

        }

        .botton input {
            width: 100px;
        }

        .botton span {
            width: 68px;
        }

        span input {
            width: 120px;
        }

        .findBtn1 {
            margin-left: 50px;
        }
    </style>
</head>
<body>
<div id="modal-overlay">

</div>
<div class="modal-data">
    <div style="height: 60px">
        <ul>
            <li style="text-align: left;margin-left: 60px;height: 40px;line-height: 40px">
                <span style="margin-left: 30px;">名称：</span>
                <span>
				  		 	<input class="name1" type="text">
				  		</span>
                <span>电话号码：</span>
                <span>
				  		 	<input class="cflxdh" type="text">
				  		</span>
                <span style="margin-left: 30px;">开始时间：</span><span><input class="scinput1" name="beginTime"
                                                                          type="text"
                                                                          onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}',dateFmt:'yyyy-MM-dd'})"
                                                                          id="datemin" class="input-text"
                                                                          style="width:90px;"
                                                                          value="${beginTime}"></span>
                <span>结束时间：</span><span><input class="scinput1" name="endTime" type="text"
                                               onfocus="WdatePicker({minDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})"
                                               id="datemax" class="input-text" style="width:90px;"
                                               value="${endTime}"></span>
                <span>
				  			<button id="findBtn1" class="findBtn1">
				  				查询
				  			</button>
				  		</span>
            </li>
        </ul>
    </div>

    <div style="width:100%; height:350px; overflow:scroll;">
        <form action="">
            <table class="head2" id="studebntList" style="width: auto;white-space:nowrap;border-spacing: 0px">
                <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
                    <td></td>
                    <td>学员名称</td>
                    <td>编码</td>
                    <td>身份证号码</td>
                    <td>入学日期</td>
                    <td>手机</td>
                    <td>联系电话</td>
                    <td>出生日期</td>
                    <td>简称</td>
                    <td>描述</td>
                    <td>创建时间</td>
                    <td>创建者</td>
                    <td>创建者用户名</td>
                    <td>最后修改时间</td>
                    <td>最后修改者</td>
                    <td>修改者用户名</td>
                    <td>财务组织</td>
                    <td>国籍</td>
                    <td>民族</td>
                    <td>家庭地址</td>
                    <td>联系地址</td>
                    <td>暂住证号</td>
                    <td>邮政编码</td>
                    <td>电子邮箱</td>
                    <td>申领类型</td>
                    <td>现准驾车型号</td>
                    <td>申请现准驾车型号</td>
                    <td>推荐人</td>
                    <td>班级</td>
                    <td>金额</td>
                    <td>本地/异地</td>
                    <td>培训类型</td>
                    <td>备注</td>
                    <td>性别</td>
                    <td>学员状态</td>
                    <td>培训计时卡</td>
                    <td>已收</td>
                    <td>欠费</td>
                    <td>科目一考试次数</td>
                    <td>科目二考试次数</td>
                    <td>科目三考试次数</td>
                    <td>部门</td>
                    <td>科目一合格日期</td>
                    <td>科目二合格日期</td>
                    <td>科目三合格日期</td>
                    <td>准考证明编号</td>
                    <td>手续状态</td>
                    <td>存放位置</td>
                    <td>科目一不及格时间</td>
                    <td>科目二不及格时间</td>
                    <td>科目三不及格时间</td>
                    <td>本校/外校</td>
                    <td>结业证编号</td>
                    <td>科目二退练日期</td>
                    <td>科目二退练次数</td>
                    <td>科目二退练原因</td>
                    <td>科目三退练日期</td>
                    <td>科目三退练次数</td>
                    <td>科目三退练原因</td>
                    <td>拼音首字母</td>
                    <td>拼音</td>
                    <td>技能表已交接</td>
                    <td>档案已交接</td>
                    <td>名称</td>
                    <td>科目二练车班次</td>
                    <td>科目三练车班次</td>
                    <td>模拟考次数</td>
                    <td>科目一缺考次数</td>
                    <td>模拟考分数</td>
                    <td>模拟考时间</td>
                    <td>科目二缺考次数</td>
                    <td>科目二缺考时间</td>
                    <td>科目一缺考时间</td>
                    <td>科目三缺考次数</td>
                    <td>科目三缺考时间</td>
                    <td>优惠券</td>
                    <td>存放位置</td>
                    <td>三年清零</td>
                    <td>五次清零</td>
                    <td>预约考试备注</td>
                    <td>预约练车备注</td>
                </tr>
                <c:forEach items="${students}" var="student" varStatus="s">
                    <tr class="studentData">
                        <td><input class="data-checkbox" type="checkbox" name="student" style="width: 15px;"
                                   value="${student.fid}"/></td>
                        <td>${student.fnameL2}</td>
                        <td>${student.fnumber}</td>
                        <td>${student.cfidcardno}</td>
                        <td>${student.cfrxsj}</td>
                        <td>${student.cfsjhm}</td>
                        <td>${student.cflxdh}</td>
                        <td>${student.cfbirthdays}</td>
                        <td>${student.fsimplename}</td>
                        <td>${student.fdescriptionL1}</td>
                        <td>${student.fcreatetime}</td>
                        <td>${student.fcreateName}</td>
                        <td>${student.fcreateName}</td>
                        <td>${student.flastupdatetime}</td>
                        <td>${student.flastupdateName}</td>
                        <td>${student.flastupdateName}</td>
                        <td>${sessionScope.company.fnameL2}</td>
                        <td></td>
                        <td>${student.cfnation}</td>
                        <td>${student.cfaddress}</td>
                        <td>${student.cflinkaddress}</td>
                        <td>${student.cfzzzh}</td>
                        <td>${student.cfyzbm}</td>
                        <td>${student.cfemail}</td>
                        <c:if test="${student.cfsllx eq 1}">
                            <td>初次申领</td>
                        </c:if>
                        <c:if test="${student.cfsllx ne 1}">
                            <td>增加准驾车型</td>
                        </c:if>
                        <td>${student.cfxzjcxdh}</td>
                        <td>${student.cfslzjcxdh}</td>
                        <td>${student.cftjrName}</td>
                        <td>${student.cfclazzName}</td>
                        <td>${student.cfamount}元</td>
                        <c:if test="${student.cflocal eq 1}">
                            <td>本地</td>
                        </c:if>
                        <c:if test="${student.cflocal eq 2}">
                            <td>异地</td>
                        </c:if>
                        <c:if test="${student.cflocal ne 1&&student.cflocal ne 2 }">
                            <td></td>
                        </c:if>
                        <td>${student.cftrainTypeNAME}</td>
                        <td>${student.cfremark}</td>
                        <c:if test="${student.cfsex eq 1}">
                            <td>男</td>
                        </c:if>
                        <c:if test="${student.cfsex eq 2}">
                            <td>女</td>
                        </c:if>
                        <c:if test="${student.cfsex ne 1&&student.cfsex ne 2 }">
                            <td></td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 1}">
                            <td>已报名</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 2}">
                            <td>科目一通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 3}">
                            <td>科目一未通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 4}">
                            <td>科目二通过,科目三未开始</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 5}">
                            <td>科目二未通过,科目三未开始</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 6}">
                            <td>科目二练车中,科目三未开始</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 7}">
                            <td>科目三通过,科目二通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 8}">
                            <td>科目三未通过,科目二通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 9}">
                            <td>科目三练车中,科目二通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 10}">
                            <td>已结业</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 11}">
                            <td>已退学</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 12}">
                            <td>模拟考试合格</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 13}">
                            <td>已过期</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 14}">
                            <td>作废</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 15}">
                            <td>科目三练车中,科目二未通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 16}">
                            <td>科目三练车中,科目二未开始</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 17}">
                            <td>科目三通过,科目二未通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 18}">
                            <td>科目三通过,科目二练车中</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 19}">
                            <td>科目三通过,科目二未开始</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 20}">
                            <td>科目二未通过,科目三未通过</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 21}">
                            <td>科目三未通过，科目二未开始</td>
                        </c:if>
                        <c:if test="${student.cfstudentstate eq 22}">
                            <td>科目二练车中,科目三未通过</td>
                        </c:if>
                        <td>${student.cftimecard}</td>
                        <td>${student.cfreceived}元</td>
                        <td>${student.cfarrearage}元</td>
                        <td>${student.cfkmykss}</td>
                        <td>${student.cfkmekss}</td>
                        <td>${student.cfkmskss}</td>
                        <td>${student.cfdepartment}</td>
                        <td>${student.cfkmyherq}</td>
                        <td>${student.cfkmehgrq}</td>
                        <td>${student.cfkmshgrq}</td>
                        <td>${student.cfzkzmbh}</td>
                        <td>${student.cfdazt}</td>
                        <td>${student.cfcfwz}</td>
                        <td>${student.cfkmybjgsj}</td>
                        <td>${student.cfkmebjgsj}</td>
                        <td>${student.cfkmsbjgsj}</td>
                        <c:if test="${student.cfbxwx eq 1}">
                            <td>本校</td>
                        </c:if>
                        <c:if test="${student.cfbxwx eq 2}">
                            <td>外校</td>
                        </c:if>
                        <c:if test="${student.cfbxwx ne 1&&student.cfbxwx ne 2 }">
                            <td></td>
                        </c:if>
                        <td>${student.cfjsybh}</td>
                        <td>${student.cfkmetlrq}</td>
                        <td>${student.cfbimudf0060}</td>
                        <td>${student.cfbimudf0061}</td>
                        <td>${student.cfkmstlrq}</td>
                        <td>${student.cfkmstlcs}</td>
                        <td>${student.cfkmstlyy}</td>
                        <td>${student.cfshortpinyin}</td>
                        <td>${student.cfpinyin}</td>
                        <c:if test="${student.cfjnbjj eq 1}">
                            <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
                        </c:if>
                        <c:if test="${student.cfjnbjj ne 1}">
                            <td><input type="checkbox" value="0" disabled="disabled"/></td>
                        </c:if>
                        <c:if test="${student.cfdajj eq 1}">
                            <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
                        </c:if>
                        <c:if test="${student.cfdajj ne 1}">
                            <td><input type="checkbox" value="0" disabled="disabled"/></td>
                        </c:if>
                        <td>中国</td>
                        <td>${student.cfkmelcsjName}</td>
                        <td>${student.cfkmslcsjName}</td>
                        <td>${student.cfmnkcs}</td>
                        <td>${student.cfkmyqkcs}</td>
                        <td>${student.cfmnkfs}</td>
                        <td>${student.cfmnksj}</td>
                        <td>${student.cfkmeqkcs}</td>
                        <td>${student.cfkmeksqksj}</td>
                        <td>${student.cfkmyksqksj}</td>
                        <td>${student.cfkmsqkcs}</td>
                        <td>${student.cfkmsksqksj}</td>
                        <td>${student.cfyhj}</td>
                        <td>${student.cfcfwz}</td>
                        <c:if test="${student.cfsnql eq 1}">
                            <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
                        </c:if>
                        <c:if test="${student.cfsnql ne 1}">
                            <td><input type="checkbox" value="0" disabled="disabled"/></td>
                        </c:if>
                        <c:if test="${student.cfwcql eq 1}">
                            <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
                        </c:if>
                        <c:if test="${student.cfwcql ne 1}">
                            <td><input type="checkbox" value="0" disabled="disabled"/></td>
                        </c:if>
                        <td>${student.cftrainbespeakremark}</td>
                        <td>${student.cfexambespeakremark}</td>

                    </tr>
                </c:forEach>


            </table>

        </form>
    </div>

    <div class="page" style="display: none;">
    	<%--<input type="hidden" class="state"  value="1" >--%>
        <ul style="border-bottom: none;">
            <li>
                <span class="indexPage">首页</span>
                <span class="prevPage">上一页</span>
                <span class="nextPage">下一页</span>
                <span class="endPage">尾页</span>
                <input type="hidden" id="totalPage" value="${pb}">
                <input type="hidden" id="index" value="1">
            </li>
        </ul>
    </div>

    <button class="subtn" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;left: 250px">
        确定
    </button>
    <button class="btn" style="width: 150px;position: absolute;bottom: 35px;font-size: 16px;right: 250px">
        关闭
    </button>


</div>
</body>
<script type="text/javascript" src="<%=path2%>/JQuery/jquery-1.8.2.js"></script>
<script id="table-template" type="text/x-handlebars-template">
    {{#isNull sList}}
    <tr style="background: #f2f2f2;height: 30px;line-height: 20px;" class="sel">
        <th style="width: 20px"></th>
        <td>学员名称</td>
        <td>编码</td>
        <td>身份证号码</td>
        <td>入学日期</td>
        <td>手机</td>
        <td>联系电话</td>
        <td>出生日期</td>
        <td>简称</td>
        <td>描述</td>
        <td>创建时间</td>
        <td>创建者</td>
        <td>创建者用户名</td>
        <td>最后修改时间</td>
        <td>最后修改者</td>
        <td>修改者用户名</td>
        <td>财务组织</td>
        <td>国籍</td>
        <td>民族</td>
        <td>家庭地址</td>
        <td>联系地址</td>
        <td>暂住证号</td>
        <td>邮政编码</td>
        <td>电子邮箱</td>
        <td>申领类型</td>
        <td>现准驾车型号</td>
        <td>申请现准驾车型号</td>
        <td>推荐人</td>
        <td>班级</td>
        <td>金额</td>
        <td>本地/异地</td>
        <td>培训类型</td>
        <td>备注</td>
        <td>性别</td>
        <td>学员状态</td>
        <td>培训计时卡</td>
        <td>已收</td>
        <td>欠费</td>
        <td>科目一考试次数</td>
        <td>科目二考试次数</td>
        <td>科目三考试次数</td>
        <td>部门</td>
        <td>科目一合格日期</td>
        <td>科目二合格日期</td>
        <td>科目三合格日期</td>
        <td>准考证明编号</td>
        <td>手续状态</td>
        <td>存放位置</td>
        <td>科目一不及格时间</td>
        <td>科目二不及格时间</td>
        <td>科目三不及格时间</td>
        <td>本校/外校</td>
        <td>结业证编号</td>
        <td>科目二退练日期</td>
        <td>科目二退练次数</td>
        <td>科目二退练原因</td>
        <td>科目三退练日期</td>
        <td>科目三退练次数</td>
        <td>科目三退练原因</td>
        <td>拼音首字母</td>
        <td>拼音</td>
        <td>技能表已交接</td>
        <td>档案已交接</td>
        <td>名称</td>
        <td>科目二练车班次</td>
        <td>科目三练车班次</td>
        <td>模拟考次数</td>
        <td>科目一缺考次数</td>
        <td>模拟考分数</td>
        <td>模拟考时间</td>
        <td>科目二缺考次数</td>
        <td>科目二缺考时间</td>
        <td>科目一缺考时间</td>
        <td>科目三缺考次数</td>
        <td>科目三缺考时间</td>
        <td>优惠券</td>
        <td>存放位置</td>
        <td>三年清零</td>
        <td>五次清零</td>
        <td>预约考试备注</td>
        <td>预约练车备注</td>
    </tr>
    {{#each sList}}
    <tr class="studentData">
        <td style="display: none;width: 20px;"><input type="text" class="fseq" name="fid" value="{{fid}}"
        ></td>
        <td class="fir"><input class="data-checkbox" type="checkbox" value="{{fid}}" name="student"/></td>
        <td>{{fnameL2}}</td>
        <td>{{fnumber}}</td>
        <td>{{cfidcardno}}</td>
        <td>{{cfrxsj}}</td>
        <td>{{cfsjhm}}</td>
        <td>{{cflxdh}}</td>
        <td>{{cfbirthdays}}</td>
        <td>{{fsimplename}}</td>
        <td>{{fdescriptionL1}}</td>
        <td>{{fcreatetime}}</td>
        <td>{{fcreateName}}</td>
        <td>{{fcreateName}}</td>
        <td>{{flastupdatetime}}</td>
        <td>{{flastupdateName}}</td>
        <td>{{flastupdateName}}</td>
        <td>{{sessionScope.company.fnameL2}}</td>
        <td></td>
        <td>{{cfnation}}</td>
        <td>{{cfaddress}}</td>
        <td>{{cflinkaddress}}</td>
        <td>{{cfzzzh}}</td>
        <td>{{cfyzbm}}</td>
        <td>{{cfemail}}</td>
        {{#compare cfsllx 1}}
        <td>初次申领</td>
        {{else}}
        <td>增加准驾车型</td>
        {{/compare}}
        <td>{{cfxzjcxdh}}</td>
        <td>{{cfslzjcxdh}}</td>
        <td>{{cftjrName}}</td>
        <td>{{cfclazzName}}</td>
        <td>{{cfamount}}元</td>
        {{#compare cflocal 1}}
        <td>本地</td>
        {{/compare}}
        {{#compare cflocal 2}}
        <td>异地</td>
        {{/compare}}
        {{#compare cflocal 3}}
        <td></td>
        {{/compare}}
        <td>{{cftrainTypeNAME}}</td>
        <td>{{cfremark}}</td>
        {{#compare cfsex 1}}
        <td>男</td>
        {{/compare}}
        {{#compare cfsex 2}}
        <td>女</td>
        {{/compare}}
        {{#compare cfsex 3}}
        <td></td>
        {{/compare}}

        {{#compare cfstudentstate 1}}
        <td>已报名</td>
        {{/compare}} {{#compare cfstudentstate 2}}
        <td>科目一通过</td>
        {{/compare}} {{#compare cfstudentstate 3}}
        <td>科目一未通过</td>
        {{/compare}} {{#compare cfstudentstate 4}}
        <td>科目二通过,科目三未开始</td>
        {{/compare}} {{#compare cfstudentstate 5}}
        <td>科目二未通过,科目三未开始</td>
        {{/compare}} {{#compare cfstudentstate 6}}
        <td>科目二练车中,科目三未开始</td>
        {{/compare}} {{#compare cfstudentstate 7}}
        <td>科目三通过,科目二通过</td>
        {{/compare}} {{#compare cfstudentstate 8}}
        <td>科目三未通过,科目二通过</td>
        {{/compare}} {{#compare cfstudentstate 9}}
        <td>科目三练车中,科目二通过</td>
        {{/compare}} {{#compare cfstudentstate 10}}
        <td>已结业</td>
        {{/compare}} {{#compare cfstudentstate 11}}
        <td>已退学</td>
        {{/compare}} {{#compare cfstudentstate 12}}
        <td>模拟考试合格</td>
        {{/compare}} {{#compare cfstudentstate 13}}
        <td>已过期</td>
        {{/compare}} {{#compare cfstudentstate 14}}
        <td>作废</td>
        {{/compare}} {{#compare cfstudentstate 15}}
        <td>科目三练车中,科目二未通过</td>
        {{/compare}} {{#compare cfstudentstate 16}}
        <td>科目三练车中,科目二未开始</td>
        {{/compare}} {{#compare cfstudentstate 17}}
        <td>科目三通过,科目二未通过</td>
        {{/compare}} {{#compare cfstudentstate 18}}
        <td>科目三通过,科目二练车中</td>
        {{/compare}} {{#compare cfstudentstate 19}}
        <td>科目三通过,科目二未开始</td>
        {{/compare}} {{#compare cfstudentstate 20}}
        <td>科目二未通过,科目三未通过</td>
        {{/compare}}{{#compare cfstudentstate 21}}
        <td>科目三未通过，科目二未开始</td>
        {{/compare}}{{#compare cfstudentstate 22}}
        <td>科目二练车中,科目三未通过</td>
        {{/compare}}
        <td>{{cftimecard}}</td>
        <td>{{cfreceived}}元</td>
        <td>{{cfarrearage}}元</td>
        <td>{{cfkmykss}}</td>
        <td>{{cfkmekss}}</td>
        <td>{{cfkmskss}}</td>
        <td>{{cfdepartment}}</td>
        <td>{{cfkmyherq}}</td>
        <td>{{cfkmehgrq}}</td>
        <td>{{cfkmshgrq}}</td>
        <td>{{cfzkzmbh}}</td>
        <td>{{cfdazt}}</td>
        <td>{{cfcfwz}}</td>
        <td>{{cfkmybjgsj}}</td>
        <td>{{cfkmebjgsj}}</td>
        <td>{{cfkmsbjgsj}}</td>
        {{#if cfbxwx}}
        {{#compare cfbxwx 1}}
        <td>本校</td>
        {{/compare}}
        {{#compare cfbxwx 2}}
        <td>外校</td>
        {{/compare}}
        {{else}}
        <td></td>
        {{/if}}
        <td>{{cfjsybh}}</td>
        <td>{{cfkmetlrq}}</td>
        <td>{{cfbimudf0060}}</td>
        <td>{{cfbimudf0061}}</td>
        <td>{{cfkmstlrq}}</td>
        <td>{{cfkmstlcs}}</td>
        <td>{{cfkmstlyy}}</td>
        <td>{{cfshortpinyin}}</td>
        {{#if cfpinyin}}
        <td>{{cfpinyin}}</td>
        {{else}}
        <td></td>
        {{/if}}
        {{#compare cfjnbjj 1}}
        <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
        {{else}}
        <td><input type="checkbox" value="0" disabled="disabled"/></td>
        {{/compare}}
        {{#compare cfdajj 1}}
        <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
        {{else}}
        <td><input type="checkbox" value="0" disabled="disabled"/></td>
        {{/compare}}
        <td>中国</td>
        <td>{{cfkmelcsjName}}</td>
        <td>{{cfkmslcsjName}}</td>
        <td>{{cfmnkcs}}</td>
        <td>{{cfkmyqkcs}}</td>
        <td>{{cfmnkfs}}</td>
        <td>{{cfmnksj}}</td>
        <td>{{cfkmeqkcs}}</td>
        <td>{{cfkmeksqksj}}</td>
        <td>{{cfkmyksqksj}}</td>
        <td>{{cfkmsqkcs}}</td>
        <td>{{cfkmsksqksj}}</td>
        <td>{{cfyhj}}</td>
        <td>{{cfcfwz}}</td>
        {{#compare cfsnql 1}}
        <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
        {{else}}
        <td><input type="checkbox" value="0" disabled="disabled"/></td>
        {{/compare}}
        {{#compare cfwcql 1}}
        <td><input type="checkbox" checked="checked" value="1" disabled="disabled"/></td>
        {{else}}
        <td><input type="checkbox" value="0" disabled="disabled"/></td>
        {{/compare}}
        <td>{{cftrainbespeakremark}}</td>
        <td>{{cfexambespeakremark}}</td>
    </tr>
    {{/each}}
    {{else}}
    <td>没有搜索到您想要的内容!</td>
    {{/isNull}}

</script>
<script>
    //弹出框模版文件
    var myTemplate = Handlebars.compile($("#table-template").html());

    //注册一个比较内容是否为空
    Handlebars.registerHelper("isNull", function (v1, options) {
        if (v1 != "") {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });

    //注册一个比较大小的Helper,判断v1是否大于v2
    Handlebars.registerHelper("compare", function (v1, v2, options) {
        if (v2 == 100) {
            //满足添加继续执行
            return options.fn(this);
        }
        if (v1 == v2) {
            //满足添加继续执行
            return options.fn(this);
        } else {
            //不满足条件执行{{else}}部分
            return options.inverse(this);
        }
    });

    var beginTime = $("#datemin")
    var endTime = $("#datemax")
    var myname = $('.name1').val();
    var cflxdh = $('.cflxdh').val();

    //点击查找按钮
    $('#findBtn1').click(function () {
        myname = $('.name1').val();
        cflxdh = $('.cflxdh').val();
        index = 1
        var state = $('.state').val()
        $('#studebntList').html("<div class='loading'></div>");
        $.ajax({
            url: '<%=path2%>/DrivingSys/getPageEnrol',
            type: "post",
            data: {
                'pindex': '0',
                'name': myname,
                'cfsjhm': cflxdh,
                'beginTime': beginTime.val(),
                'endTime': endTime.val(),
                'state': state,
                'type': "yy",
                'cayType':$('.carType').val()
            },
            dataType: "json",
            success: function (res) {
                $('#studebntList').html(myTemplate(res));
                $('#totalPage').val(res.pb);
            },
            error: function () {
                alert('Error');
            }
        });

    })

    $('.indexPage').click(function () {
        var index = 0
        var state = $('.state').val()
        myname = $('.name1').val();
        $('#index').val(0)
        $.ajax({
            url: '<%=path2%>/DrivingSys/getPageEnrol',
            type: "post",
            data: {
                'pindex': index,
                'name': myname,
                'cfsjhm': cflxdh,
                'beginTime': beginTime.val(),
                'endTime': endTime.val(),
                'state': state,
                'type': "yy",
                'cayType':$('.carType').val()
            },
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.endPage').click(function () {
        myname = $('.name1').val();
        var state = $('.state').val()
        var index = parseInt($('#totalPage').val())
        $('#index').val(index)
        $.ajax({
            url: '<%=path2%>/DrivingSys/getPageEnrol',
            type: "post",
            data: {
                'pindex': index,
                'name': myname,
                'cfsjhm': cflxdh,
                'beginTime': beginTime.val(),
                'endTime': endTime.val(),
                'state': state,
                'type': "yy",
                'cayType':$('.carType').val()
            },
            dataType: "json",
            success: function (json) {
                $('#studebntList').html(myTemplate(json));
            },
            error: function () {
                alert('Error');
            }
        });
    })


    $('.nextPage').click(function () {
        myname = $('.name1').val();
        var state = $('.state').val()
        var total = parseInt($('#totalPage').val())
        if ($('#index').val() < total) {
            var index = $('#index').val() - 0 + 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path2%>/DrivingSys/getPageEnrol',
                type: "post",
                data: {
                    'pindex': index,
                    'name': myname,
                    'cfsjhm': cflxdh,
                    'beginTime': beginTime.val(),
                    'endTime': endTime.val(),
                    'state': state,
                    'type': "yy",
                    'cayType':$('.carType').val()
                },
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经到尾页了！")
        }
    })


    $('.prevPage').click(function () {
        myname = $('.name1').val();
        var state = $('.state').val()
        if ($('#index').val() != '0') {
            var index = $('#index').val() - 0 - 1
            $('#index').val(index)
            $.ajax({
                url: '<%=path2%>/DrivingSys/getPageEnrol',
                type: "post",
                data: {
                    'pindex': index,
                    'name': myname,
                    'cfsjhm': cflxdh,
                    'beginTime': beginTime.val(),
                    'endTime': endTime.val(),
                    'state': state,
                    'type': "yy",
                    'cayType':$('.carType').val()
                },
                dataType: "json",
                success: function (json) {
                    $('#studebntList').html(myTemplate(json));
                },
                error: function () {
                    alert('Error');
                }
            });
        } else {
            alert("已经是首页了")
        }
    })

</script>
</html>